<?php
require('conn.php');
//用户相应操作

//查询用户
function selectUserhome($uName, $uPass)
{
  if (!$uPass) {
    $sql = "SELECT * FROM `tbl_user` WHERE uName='$uName'";
  } else {
    $sql = "SELECT * FROM `tbl_user` WHERE uName='$uName' AND uPass='$uPass'";
  }
  return exec_select($sql);
}
;

function insertUser($uName, $uPass, $avatarName)
{
  $sql = "INSERT INTO `tbl_user` (uId, uName, uPass, avatar, created_time,is_admin) VALUES (NULL, '$uName', '$uPass', '$avatarName', NOW(),0)";
  return exec_update($sql);
}

?>